<template>
    <div class="header">
        <span class="add" @click="getUrl()">
            <i class="el-icon-star-off"></i> 收藏该页面
        </span>
        <span class="toBookmarks" @click="toBookmarks()">
            管理收藏夹 <i class="el-icon-arrow-right"></i>
        </span>
    </div>
</template>

<script>
    export default {
        props:[
            'id',
            'getUrl'
        ],
        data(){
            return {

            }
        },
        methods:{
            toBookmarks(){
                // 打开chrome  书签管理器
                chrome.tabs.create({url: "chrome://bookmarks/?id="+this.id}, function(tabs) {

                });
            }
        }
    }
</script>

<style scoped>
    .header{
        position: fixed;
        top: 0;
        width: 100%;
        height: 50px;
        background-color: #409EFF;
        display: flex;
        flex-direction: row;
        padding: 0 16px;
        font-size: 16px;
        justify-content: space-between;
        align-items: center;
        color: #fff;
    }
    .header span{
        cursor: pointer;
    }
</style>